#include <stdio.h>

int judgeyear( int year);

int main(){
    int year_1, year_2,count = 0;
    scanf("[%d,%d]", &year_1, &year_2);
    for (int i = year_1; i <= year_2; i++){
        if (judgeyear(i)==1){
            count++;
        }
    }
    printf("years=%d", count);
    return 0;
}

int judgeyear( int year){
    int flag = 0;
    if (((year % 100 != 0)&&(year % 4 ==0))||year % 400 ==0) flag = 1;
    return flag;
}